import axios from "axios";

const BASE_URL = "/api";

function axiosGet({ url = "", params = {}, configs = {} }) {
  return axios({
    baseURL: BASE_URL,
    url,
    params,
    headers: {
      "X-Frame-Options": "SAMEORIGIN",
    },

    ...configs,
  });
}

function axiosPost({ url = "", data = {} }) {
  return axios.post(url, data, {
    baseURL: BASE_URL,
  });
}

export { axiosGet, axiosPost };
